<!DOCTYPE html>
<html> 
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
	<meta http-equiv="Content-Language" content="zh-cn"/>
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>Macs.Du Golang Blog</title>
	<link rel="stylesheet" href="http://cdn.bootcss.com/twitter-bootstrap/3.0.3/css/bootstrap.min.css">	
	<link rel="shortcut icon" href="/static/ico/favicon.ico">
	<!-- Custom styles for this template -->
	<link href="/static/css/sticky-footer.css" rel="stylesheet">
	<link href="/static/css/blog.css" rel="stylesheet">
	{{.CSS}}
</head>
<body>
	<div id="wrap"><!--wrap-->
		<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
			<div class="container">
				<div class="navbar-header">
					<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
						<span class="sr-only">Toggle navigation</span>
						<span class="icon-bar"></span>
						<span class="icon-bar"></span>
						<span class="icon-bar"></span>
					</button>
					<a class="navbar-brand" href="#">个人博客</a>
				</div>
				
				<div class="collapse navbar-collapse">
					<ul class="nav navbar-nav">
						{{.Nav}}
					</ul>
					
					<form class="navbar-form navbar-left" role="search" method="GET" action="/article/search" onSubmit="return search_check();">
						<div class="form-group">
							<input type="text" id="key" name="key" class="form-control" placeholder="搜索内容">
						</div>
						<button type="submit" class="btn btn-success">搜索</button>
					</form>
				</div><!--/.nav-collapse -->
			</div><!--div container-->
		</nav><!--navbar-->
		<div class="container">
			<div class="row">
				<div class="col-lg-9">
					{{.LayoutContent}}
				</div>
				<div class="col-lg-3">
					<div class="panel panel-success">
						<div class="panel-heading">
							<h3 class="panel-title">热门文章</h3>
						</div>
						<div class="list-group">
							{{range .hot_articles}}
							<a href="/article/{{.id}}" class="list-group-item">
								{{.title}}
							</a>
							{{end}}
						</div>
					</div>
					<div class="panel panel-success">
						<div class="panel-heading">
							<h3 class="panel-title">最新文章</h3>
						</div>
						<div class="list-group">
							{{range .latest_articles}}
							<a href="/article/{{.id}}" class="list-group-item">
								{{.title}}
							</a>
							{{end}}
						</div>
					</div>
					<div class="panel panel-success">
						<div class="panel-heading">
							<h3 class="panel-title">最新评论</h3>
						</div>
						<div class="list-group">
							{{range .latest_comments}}
							<a href="/article/{{.article_id}}#{{.id}}" class="list-group-item">
								{{.nick}}:	{{.comment}}
							</a>
							{{end}}
						</div>
					</div>
					<div class="panel panel-success">
						<div class="panel-heading">
							<h3 class="panel-title">标签</h3>
						</div>
						<div>
							{{range .tags}}
							<sapn style="color:#FFFFFF;
							font-size:14pt;
							font-weight:bold;
							padding:4px;
							margin:5px 5px 5px 5px;
							text-decoration:none;
							border-radius:10px;"><a href="/article/tag/{{.id}}">{{.tag}}</a></sapn>
							{{end}}
						</div>
					</div>
				</div>
			</div><!--/row-->
		</div><!--container -->
	</div><!--wrap-->

	<div id="footer"><!--footer-->
		<div class="container">
			<p class="text-muted">Macs © 2014 All rights reserved.</p>
		</div>
	</div><!--footer-->

	<script src="http://cdn.bootcss.com/jquery/1.10.2/jquery.min.js"></script>
	<script src="http://cdn.bootcss.com/twitter-bootstrap/3.0.3/js/bootstrap.min.js"></script>
	{{.JS}}
</body>
</html>
